package com.dianpingmedia.simulate.model;


import com.dianpingmedia.common.ErrorCode;

public class SimulateResponse<T> {

    private Integer errorCode;
    private String message;
    private T data;

    public SimulateResponse() {

    }

    public SimulateResponse(Integer errorCode) {
        this.errorCode = errorCode;
    }

    public SimulateResponse(Integer errorCode, String message) {
        this.errorCode = errorCode;
        this.message = message;
    }

    public Integer getErrorCode() {
        return errorCode;
    }

    public SimulateResponse<T> setErrorCode(Integer errorCode) {
        this.errorCode = errorCode;
        return this;
    }

    public String getMessage() {
        return message;
    }

    public SimulateResponse<T> setMessage(String message) {
        this.message = message;
        return this;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }


    public static SimulateResponse create() {
        return new SimulateResponse().setErrorCode(ErrorCode.OK.getValue());
    }


}
